{extend name="public:_base" /}
{block name="css"}
<link rel="stylesheet" type="text/css" href="__STATIC__/admin/uploadify/uploadify.css">
{/block}
{block name="js"}
{include file="public/_validform"}
{load href="__STATIC__/admin/js/common.js" /}
<script type="text/javascript" src="__STATIC__/admin/hui/lib/ueditor/1.4.3/ueditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="__STATIC__/admin/hui/lib/ueditor/1.4.3/ueditor.all.js"></script>
<!--上传配置 -->
<script src="__STATIC__/admin/uploadify/jquery.uploadify.min.js" type="text/javascript"></script>
<script src="__STATIC__/admin/js/upfile.js" type="text/javascript"></script>

<script type="text/javascript">
    upload_image('image','','700','400','700');
    var URL = {
        uploader: '{:url('admin/Upload/image')}',
        swf:'__STATIC__/admin/uploadify/uploadify.swf',
        ROOT:'__PUBLIC__/uploads/image',
    }
    var ue = UE.getEditor('editor');
</script>
{/block}
{block name="main"}
<form class="form form-horizontal" action="#" id="form1" method="post">

    <div class="row cl">
        <label class="form-label col-xs-2 col-sm-2"><span class="c-red">*</span>bbs标题：</label>
        <div class="formControls col-xs-10 col-sm-10">
            <input type="text" class="input-text" value="{$data.title ?? ''}" placeholder="{:lang('title')}"  datatype="*" name="title">
        </div>

    </div>
    <div class="row cl">
        <label class="form-label col-xs-2 col-sm-2">图片700*400：</label>
        <div class="formControls col-xs-10 col-sm-10">
            <div id="image_s">
                <img src="__PUBLIC__/uploads/{$data.image ?'image/'.$data.image: 'sm_nopic.jpg'}"
                     width="200px" height="200px"/></div>
            <input id="image_post" name="image" type="hidden" value="{$data.image}"/>
            <input name="old_image" type="hidden" value="{$data.image}"/>
            <input id="image" name="image_upload" type="file" multiple="true">
        </div>
    </div>

    <div class="row cl">
        <label class="form-label col-xs-2 col-sm-2">{:lang('Quick description')}：</label>
        <div class="formControls col-xs-10 col-sm-10">
                <textarea name="miaoshu" cols="" rows="" class="textarea" placeholder="{:lang('Enter at least 10 characters')}"
                           dragonfly="true"
                >{$data.miaoshu ?? ''}</textarea>
        </div>
    </div>

    <div class="row cl">
        <label class="form-label col-xs-2 col-sm-2"><span class="c-red">*</span>{:lang('content')}：</label>
        <div class="formControls col-xs-10 col-sm-10">
            <script id="editor" type="text/plain" name="center" style="width:100%;height:400px;">{$data.center|default=''|html_entity_decode ?? ''}</script>
            </div>
            </div>
                    {eq name="$data.status" value="2"}
            <div class="row cl">
                <label class="form-label col-xs-2 col-sm-2">不通过原因：</label>
            <div class="formControls col-xs-10 col-sm-10">
                {$data.error ?? ''}
            </div>
            </div>
                    {/eq}

            <div class="row cl">
                {:token()}
                <div class="col-xs-6 col-sm-6 col-xs-offset-4 col-sm-offset-2">
                <input name="id" value="{$data.id ?? ''}"  type="hidden" />

                <input class="btn radius btn-primary radius" type="submit" value="&nbsp;&nbsp;{:lang('save')}&nbsp;&nbsp;">
                <input class="btn radius btn-default radius" type="reset" value="&nbsp;&nbsp;{:lang('cancel')}&nbsp;&nbsp;">

            </div>
            </div>
            </form>
{/block}
